package com.zens.cms.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.zens.cms.entity.TColumn;
import com.zens.cms.entity.TColumnExample;
import com.zens.cms.entity.TColumnExample.Criteria;
import com.zens.cms.mapper.TColumnMapper;
import com.zens.cms.services.IHomePageService;

@Service
public class HomePageImpl implements IHomePageService {
	
	@Resource
	TColumnMapper columnMapper;

	@Override
	public TColumn getTcolEntityByName(String name) {
		TColumnExample te = new TColumnExample();
		Criteria tc = te.createCriteria();
		tc.andFcolumnnameEqualTo(name);
		List<TColumn> list = columnMapper.selectByExample(te);
		return list.size() > 0?list.get(0):null;
	}

}
